/*
 * Label.cpp
 *
 *  Created on: 2010-12-17
 *      Author: wenjian
 */

#include "Label.h"

namespace S {

  Label::Label(real x, real y, real w, real h, const std::wstring& text):text(text) {
    Gdiplus::FontFamily fontName( L"Courier New" );
    font = new Gdiplus::Font( &fontName, 11, Gdiplus::FontStyleRegular, Gdiplus::UnitPixel );
    brush = new Gdiplus::SolidBrush( Gdiplus::Color( 255, 244, 244, 244 ));
    format.SetLineAlignment(Gdiplus::StringAlignmentCenter);
    setWidth(w);
    setHeight(h);
    setCoordinate(x, y);
    createBoundRect();
  }

  Label::~Label() {
    delete brush;
    delete font;
  }

}
